perm filename PROJCT.DOC[OLD,BGB] blob sn#099407 filedate 1974-04-26 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00005 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	THE PERSPECTIVE PROJECTION
C00004 00003	The Image Plane.
C00006 00004	In computer graphics and vision the process of Perspective Projection
C00007 00005	α PROJECT PERSPECTIVE OF ALL THE VERTICES
C00009 ENDMK
C⊗;
THE PERSPECTIVE PROJECTION

	Given a three dimensional representation of some objects and the desire
to have a realistic looking two dimensional image of those 
objects the process of making the image involves Perspective Projection.

In Nature the perspective projection was discovered one billion years
ago with the evolution of the first animals with eyes.  It is surprising
that the eyes of verbrates and inverbrates are so similair inspite
of the fact that the differentiation of animals into those with and
those without backbones occured before sight.

In Art the Perspective Projection was discovered and pursued by
the painters of Northern Italy about four hundred years ago.

The invention of the telescope, camera  obscura and the microscope
were contempories with  the artistic discovery of perspective.
However film for the camera wasn't invented until the  early
nineteenth century.
The Image Plane.
	Let's insist that the desired image is flat, painting
	a perspective image on a dome is a problem for another day.
The Lens Center.
	Let's insist that the image desired is similair to the image
	formed by a thin circular convex converging lens.
	Other classes of lens and images are possible but are 
	not going to be discussed here.  Of Particular irrelevance
	are the images formed by four by four matrices in the
	Projective Geometry.
The Window.
	The image to be formed is Finite and Rectangular.
	And the four line segments which discribed the rectangle
	of the image are formally called the window and informally
	but more accurately the frame or border of the image.
In computer graphics and vision the process of Perspective Projection
depends greatly on WHAT is being projected.  Knowing how to project
a point into an image is nice but it doesn't readily lead
to an efficient algorithm for projecting line segments, polygons and
polyhedrons.

The major difficulty lies in `Clipping' the object down to that
portion of it that is in view.

At first encounter Clipping may seem to be a minor nuisance
like Arithmetic Overflow that can be avoided rather than
dealt with, however there appear to be only two ways
α PROJECT PERSPECTIVE OF ALL THE VERTICES;
	FOREACH B|BεALBODY DO
	FOREACH V|BV⊗B≡V DO
BEGIN	"PROJECT VERTEX"
	REAL X,Y,Z,XX,YY,ZZ;
	INTEGER IX,IY;
	X	←	∂(V)[1]  -  C[4,1];			α TRANSLATION;
	Y	←	∂(V)[2]  -  C[4,2];
	Z	←	∂(V)[3]  -  C[4,3];
	XX	←	X*C[1,1] + Y*C[2,1] + Z*C[3,1];		α ROTATION;
	YY	←	X*C[1,2] + Y*C[2,2] + Z*C[3,2];
	ZZ	←	X*C[1,3] + Y*C[2,3] + Z*C[3,3];
	IF ZZ  ≤  -FOCAL THEN
BEGIN
	∂(V)[4]	←	-XX*SX/ZZ;		α PERSPECTIVE IN FRONT OF THE IMAGE PLANE;
	∂(V)[5]	←	-YY*SY/ZZ;
	∂(V)[6]	←	SZ/ZZ;
END ELSE
BEGIN
	∂(V)[4]	←	XX;			α CAMERA COORDINATES BEHIND THE IMAGE PLANE;
	∂(V)[5]	←	YY;
	∂(V)[6]	←	ZZ+FOCAL;
END;
END	"PROJECT VERTEX";